
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/vector/api/orienterclasses.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:29:14 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Orienter classes (docstrings) &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
    <link href="orienterclasses.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="Essential Functions in sympy.vector (docstrings)" href="vectorfunctions.html" />
    <link rel="prev" title="Essential Classes in sympy.vector (docstrings)" href="classes.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="vectorfunctions.html" title="Essential Functions in sympy.vector (docstrings)"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="classes.html" title="Essential Classes in sympy.vector (docstrings)"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Vector</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Orienter classes (docstrings)</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="orienter-classes-docstrings">
<h1>Orienter classes (docstrings)<a class="headerlink" href="#orienter-classes-docstrings" title="Permalink to this headline">¶</a></h1>
<section id="orienter">
<h2>Orienter<a class="headerlink" href="#orienter" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.orienters.Orienter">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.orienters.</span></span><span class="sig-name descname"><span class="pre">Orienter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L9-L19"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.Orienter" title="Permalink to this definition">¶</a></dt>
<dd><p>Super-class for all orienter classes.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.orienters.Orienter.rotation_matrix">
<span class="sig-name descname"><span class="pre">rotation_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L14-L19"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.Orienter.rotation_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>The rotation matrix corresponding to this orienter
instance.</p>
</dd></dl>

</dd></dl>

</section>
<section id="axisorienter">
<h2>AxisOrienter<a class="headerlink" href="#axisorienter" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.orienters.AxisOrienter">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.orienters.</span></span><span class="sig-name descname"><span class="pre">AxisOrienter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L22-L99"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.AxisOrienter" title="Permalink to this definition">¶</a></dt>
<dd><p>Class to denote an axis orienter.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.orienters.AxisOrienter.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L38-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.AxisOrienter.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Axis rotation is a rotation about an arbitrary axis by
some angle. The angle is supplied as a SymPy expr scalar, and
the axis is supplied as a Vector.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>angle</strong> : Expr</p>
<blockquote>
<div><p>The angle by which the new system is to be rotated</p>
</div></blockquote>
<p><strong>axis</strong> : Vector</p>
<blockquote>
<div><p>The axis around which the rotation has to be performed</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">AxisOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">orienter</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.orienters.AxisOrienter.rotation_matrix">
<span class="sig-name descname"><span class="pre">rotation_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">system</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L68-L91"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.AxisOrienter.rotation_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>The rotation matrix corresponding to this orienter
instance.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>system</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system wrt which the rotation matrix
is to be computed</p>
</div></blockquote>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="bodyorienter">
<h2>BodyOrienter<a class="headerlink" href="#bodyorienter" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.orienters.BodyOrienter">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.orienters.</span></span><span class="sig-name descname"><span class="pre">BodyOrienter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rot_order</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L167-L234"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.BodyOrienter" title="Permalink to this definition">¶</a></dt>
<dd><p>Class to denote a body-orienter.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.orienters.BodyOrienter.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rot_order</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L179-L234"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.BodyOrienter.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Body orientation takes this coordinate system through three
successive simple rotations.</p>
<p>Body fixed rotations include both Euler Angles and
Tait-Bryan Angles, see <a class="reference external" href="https://en.wikipedia.org/wiki/Euler_angles">https://en.wikipedia.org/wiki/Euler_angles</a>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>angle1, angle2, angle3</strong> : Expr</p>
<blockquote>
<div><p>Three successive angles to rotate the coordinate system by</p>
</div></blockquote>
<p><strong>rotation_order</strong> : string</p>
<blockquote>
<div><p>String defining the order of axes for rotation</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">BodyOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>A ‘Body’ fixed rotation is described by three angles and
three body-fixed rotation axes. To orient a coordinate system D
with respect to N, each sequential rotation is always about
the orthogonal unit vectors fixed to D. For example, a ‘123’
rotation will specify rotations about N.i, then D.j, then
D.k. (Initially, D.i is same as N.i)
Therefore,</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">body_orienter</span> <span class="o">=</span> <span class="n">BodyOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;123&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">body_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<p>is same as</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">AxisOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter1</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter1</span><span class="p">,</span> <span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter2</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q2</span><span class="p">,</span> <span class="n">D</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">D</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter2</span><span class="p">,</span> <span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter3</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q3</span><span class="p">,</span> <span class="n">D</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">D</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter3</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<p>Acceptable rotation orders are of length 3, expressed in XYZ or
123, and cannot have a rotation about about an axis twice in a row.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">body_orienter1</span> <span class="o">=</span> <span class="n">BodyOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;123&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">body_orienter2</span> <span class="o">=</span> <span class="n">BodyOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;ZXZ&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">body_orienter3</span> <span class="o">=</span> <span class="n">BodyOrienter</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;XYX&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="spaceorienter">
<h2>SpaceOrienter<a class="headerlink" href="#spaceorienter" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.orienters.SpaceOrienter">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.orienters.</span></span><span class="sig-name descname"><span class="pre">SpaceOrienter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rot_order</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L237-L297"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.SpaceOrienter" title="Permalink to this definition">¶</a></dt>
<dd><p>Class to denote a space-orienter.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.orienters.SpaceOrienter.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rot_order</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L249-L297"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.SpaceOrienter.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Space rotation is similar to Body rotation, but the rotations
are applied in the opposite order.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>angle1, angle2, angle3</strong> : Expr</p>
<blockquote>
<div><p>Three successive angles to rotate the coordinate system by</p>
</div></blockquote>
<p><strong>rotation_order</strong> : string</p>
<blockquote>
<div><p>String defining the order of axes for rotation</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">SpaceOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>To orient a coordinate system D with respect to N, each
sequential rotation is always about N’s orthogonal unit vectors.
For example, a ‘123’ rotation will specify rotations about
N.i, then N.j, then N.k.
Therefore,</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">space_orienter</span> <span class="o">=</span> <span class="n">SpaceOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;312&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">space_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<p>is same as</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">AxisOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter1</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter1</span><span class="p">,</span> <span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter2</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q2</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">B</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter2</span><span class="p">,</span> <span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter3</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q3</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter3</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.vector.orienters.BodyOrienter" title="sympy.vector.orienters.BodyOrienter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BodyOrienter</span></code></a></dt><dd><p>Orienter to orient systems wrt Euler angles.</p>
</dd>
</dl>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="quaternionorienter">
<h2>QuaternionOrienter<a class="headerlink" href="#quaternionorienter" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.orienters.QuaternionOrienter">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.orienters.</span></span><span class="sig-name descname"><span class="pre">QuaternionOrienter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">q0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q3</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L300-L386"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.QuaternionOrienter" title="Permalink to this definition">¶</a></dt>
<dd><p>Class to denote a quaternion-orienter.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.orienters.QuaternionOrienter.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rot_order</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/orienters.py#L333-L370"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.orienters.QuaternionOrienter.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Quaternion orientation orients the new CoordSys3D with
Quaternions, defined as a finite rotation about lambda, a unit
vector, by some amount theta.</p>
<p>This orientation is described by four parameters:</p>
<p>q0 = cos(theta/2)</p>
<p>q1 = lambda_x sin(theta/2)</p>
<p>q2 = lambda_y sin(theta/2)</p>
<p>q3 = lambda_z sin(theta/2)</p>
<p>Quaternion does not take in a rotation order.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>q0, q1, q2, q3</strong> : Expr</p>
<blockquote>
<div><p>The quaternions to rotate the coordinate system by</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q0</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q0 q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">QuaternionOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q_orienter</span> <span class="o">=</span> <span class="n">QuaternionOrienter</span><span class="p">(</span><span class="n">q0</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">q_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Orienter classes (docstrings)</a><ul>
<li><a class="reference internal" href="#orienter">Orienter</a></li>
<li><a class="reference internal" href="#axisorienter">AxisOrienter</a></li>
<li><a class="reference internal" href="#bodyorienter">BodyOrienter</a></li>
<li><a class="reference internal" href="#spaceorienter">SpaceOrienter</a></li>
<li><a class="reference internal" href="#quaternionorienter">QuaternionOrienter</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="classes.html"
                        title="previous chapter">Essential Classes in sympy.vector (docstrings)</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="vectorfunctions.html"
                        title="next chapter">Essential Functions in sympy.vector (docstrings)</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/modules/vector/api/orienterclasses.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="vectorfunctions.html" title="Essential Functions in sympy.vector (docstrings)"
             >next</a> |</li>
        <li class="right" >
          <a href="classes.html" title="Essential Classes in sympy.vector (docstrings)"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Vector</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Orienter classes (docstrings)</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/vector/api/orienterclasses.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:29:14 GMT -->
</html>